package com.wyz.note.basics.remold;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 简单手机工厂类
 * @author: wei yz
 * @Date: 2024/1/14 15:34
 */
public class PhoneFactory {
    static Map<String, PhoneEnum> map = new HashMap();
    static {
        map.put("xiaomi",PhoneEnum.XIAOMI);
        map.put("huawei",PhoneEnum.HUAWEI);
    }
    public static PhoneEnum producePhone(String type){
       return map.get(type);
    }
}
